<?php
require_once APP_PATH . '/page/model.php';
/**
 * @return [type]
 */
function page_preview_action() {
	checkLogin();
	$hash = isset($_REQUEST['hash']) ? trim($_REQUEST['hash']) : '';
	if (!empty($hash)) {
		$hash = filter_data($hash);
		//获取数据
		$page_data = page_model_get_by_hash($hash);
		//输出
		if ($page_data) {
			require_once APP_PATH . '/page/build.php';
			page_preview_page($page_data);
		} else {
			show_not_found();
		}
	}

}